import { rcaNumberFormat } from './common.js'
import { dateFormat } from '@/util/date';
import { commonTableOption } from './common.js'
export const startDate = dateFormat(new Date(), 'yyyy-MM-') + '01';
export const endDate = dateFormat(new Date(), 'yyyy-MM-dd');
export const tableOption = {
  ...commonTableOption,
  page: false,
  columnBtn: false,
  index: false,
  column: [{
    label: '解行金额与车站现金缴款单据的复核',
    children: [
      {
        type: 'date',
        label: '日期',
        searchSpan: 12,
        searchRange: true,
        search: true,
        searchValue: [startDate, endDate],      // 这是我获取的默认的显示日期，我这里是['2020-08-04', '2020-09-22']
        format: 'yyyy-MM-dd',                  // 这是组件展示的日期格式
        valueFormat: 'yyyy-MM-dd',
        prop: 'tradeDate'
      }, {
        type: 'input',
        showSummary: true,
        precision: 2,
        formatter: (row, value, label, column) => {
          return rcaNumberFormat(value)
        },
        label: '解行金额',
        prop: 'jiehangMoney'
      }, {
        type: 'input',
        showSummary: true,
        precision: 2,
        formatter: (row, value, label, column) => {
          return rcaNumberFormat(value)
        },
        label: '现金缴款单据金额',
        prop: 'cashMoney'
      }, {
        type: 'input',
        showSummary: true,
        precision: 2,
        formatter: (row, value, label, column) => {
          return rcaNumberFormat(value)
        },
        label: '差异金额',
        prop: 'diffMoney'
      }]
  }]
}
